package hnair.com.shop.app;

import android.content.Context;
import java.util.HashMap;

/**
 * Created by liaowei on 2017/11/16.
 * 对外的工具类，不希望他人更改和继承
 */

public final class Shop {

    public static Configurator init(Context context) {
        getConfigurations().put(ConfigType.APPLICATION_CONTEXT.name(), context);
        return Configurator.getInstance();
    }

    private static HashMap<String, Object> getConfigurations() {
        return Configurator.getInstance().getShopConfigs();
    }

    public static Context getApplication() {
        return (Context) getConfigurations().get(ConfigType.APPLICATION_CONTEXT.name());
    }

}
